﻿using BCEntity.TMS.LearningTrain.VehicleTrainingScheduleRecord;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace BCData.TMS.LearningTrain
{
    public interface IVehicleTrainingScheduleRecordData
    {
        /// <summary>
        /// 获取单条记录
        /// </summary>
        /// <param name="vehicleTrainingScheduleRecordId"></param>
        /// <returns></returns>
        Task<VehicleTrainingScheduleRecordEntity> GetEntityAsync(long vehicleTrainingScheduleRecordId);
        /// <summary>
        /// 获取列表 分页
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<(IEnumerable<VehicleTrainingScheduleRecordEntity>, int)> GetListAsync(int pageIndex, int pageSize);
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<VehicleTrainingScheduleRecordEntity> InsertAsync(VehicleTrainingScheduleRecordEntity entity);
        /// <summary>
        /// 判断当前培训期数存在不
        /// </summary>
        /// <param name="trainingPeriods">培训期数</param>
        /// <param name="agentRecordId">代理商id</param>
        /// <param name="trainingSiteConfigId">培训点配置</param>
        /// <returns></returns>
        Task<bool> IsExist(string trainingPeriods, long agentRecordId, long trainingSiteConfigId);
        /// <summary>
        /// 获取培训
        /// </summary>
        /// <param name="agentRecordId"></param>
        /// <param name="trainingSiteConfigId"></param>
        /// <param name="trainDate"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<(IEnumerable<VehicleTrainingScheduleRecordViewEntity>, int)> Query(long? agentRecordId, long? trainingSiteConfigId, DateTime? trainDate,
            int pageIndex, int pageSize);
        /// <summary>
        /// 获取培训场次
        /// </summary>
        /// <param name="Date"></param>
        /// <returns></returns>
        Task<IEnumerable<VehicleTrainingScheduleRecordEntity>> GetTwicePendingRecord(long agentRecordId, DateTime? Date);
    }
}